package tw.rescue.model.slim3.model;

import java.io.Serializable;
import java.util.List;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;

import tw.rescue.model.Address;
import tw.rescue.model.Phone;

import com.google.appengine.api.datastore.Key;

/**
 * 使用者
 */
@Model(schemaVersion = 1)
public class Person extends BaseModel implements Serializable, Address, Phone {

	public final static String KIND = "Person";
	private static final long serialVersionUID = 1L;

	@Attribute(primaryKey = true)
	private Key key;

	@Attribute(version = true)
	private Long version;

	private String name; // 姓名
	private int age; // 年紀
	private String country; // 國別
	private String title; // 身份

	// private String tel; // 電話
	// private String mobile; // 行動電話
	// private String address; // 地址

	/* 該如何表示多個地址及電話 */

	// 地址
	private String street;
	private String city;
	private String state;
	private String postalCode;
	private double longitude;
	private double latitude;

	// 電話
	private String regionCode;
	private String areaCode;
	private String subscriberNumber;

	private List<Key> accounts;

	public void setKey(Key key) {
		this.key = key;
	}

	public Key getKey() {
		return key;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	public Long getVersion() {
		return version;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	/*
	  public String getTel() { return tel; }
	  
	  public void setTel(String tel) { this.tel = tel; }
	  
	  public String getMobile() { return mobile; }
	  
	  public void setMobile(String mobile) { this.mobile = mobile; }
	  
	  public String getAddress() { return address; }
	  
	  public void setAddress(String address) { this.address = address; }
	 */
	
	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setAccounts(List<Key> accounts) {
		this.accounts = accounts;
	}

	public List<Key> getAccounts() {
		return accounts;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public String getStreet() {
		return street;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCity() {
		return city;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getState() {
		return state;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getPostalCode() {
		return postalCode;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getLatitude() {
		return latitude;
	}

	@Override
	public String getFullAddress() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getAreaCode() {
		return areaCode;
	}

	@Override
	public String getFullPhoneNumber() {
		// TODO
		return null;
	}

	@Override
	public String getRegionCode() {
		return regionCode;
	}

	@Override
	public String getSubscriberNumber() {
		return subscriberNumber;
	}

	@Override
	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	@Override
	public void setRegionCode(String regionCode) {
		this.regionCode = regionCode;
	}

	@Override
	public void setSubscriberNumber(String subscriberNumber) {
		this.subscriberNumber = subscriberNumber;
	}

	@Override
	public void format() {
		// TODO Auto-generated method stub

	}

	@Override
	public void reset() {
		// TODO Auto-generated method stub

	}
}
